const { ccclass, property } = cc._decorator;

import baseView from '../../../../app/base/baseView';
import { app } from '../../../../app/app';
import { autoProperty } from '../../../../app/decorator';

@ccclass
export default class pageIndex extends baseView {
    @property(cc.Label)
    _title: cc.Label = null;
    @autoProperty(cc.Label)
    get title() { return this._title }
    set title(v) { this._title = v }

    @autoProperty
    btn: cc.Node = null;

    onLoad() {
        this.btn.on('click', this.onClickBtn, this);
    }

    onClickBtn() {
        app.manager.ui.show({ name: 'pageGame' });
    }

    onShow() {

    }
}